﻿using System;

namespace Monti.Utilities
{
   /// <summary>
   /// Helper methods for strings.
   /// </summary>
   public static class StringHelpers
   {
      /// <summary>
      /// Check if the provided string contains the given value ignoring case.
      /// </summary>
      /// <param name="text">String to check.</param>
      /// <param name="value">Value to check.</param>
      /// <returns>True if string contains the given value, otherwise false.</returns>
      public static bool ContainsIgnoreCase (this string text, string value)
      {
         return text.IndexOf (value, StringComparison.CurrentCultureIgnoreCase) >= 0;
      }
   }
}
